//
// Created by wangyg98 on 2025/4/11.
//

#ifndef TEYVATSURVIVOR_ENEMY_H
#define TEYVATSURVIVOR_ENEMY_H

#include <string>
#include "character.h"
#include "player.h"
#include "bullet.h"

class Enemy : public Character
{
public:
    Enemy(const std::string& path, int num, int interval);

    void Move(const Player& player);

    void Draw(int delta);

    bool CheckPlayerCollision(const Player& player);

    bool CheckBulletCollision(const Bullet& bullet);

    void Hurt();

    bool CheckAlive();
private:
    //敌人移动标识符
    int dir_x;
    int dir_y;

    const int ENEMY_SPEED = 2; //敌人速度
    const int ENEMY_WIDTH = 80; //敌人宽度
    const int ENEMY_HIGHT = 80; //敌人高度
    const int SHADOW_WIDTH = 48; //阴影宽度

    POINT enemy_pos = {0, 0};

    bool alive = true;

    IMAGE img_enemy_shadow;
};

#endif //TEYVATSURVIVOR_ENEMY_H
